#!/bin/bash
# $Id$

wd=$PWD

obj_list="common-scripts common-scripts/gui installcd-initrd/init installcd-initrd/etc/scripts installcd-initrd/etc/scripts/gui host-initram/etc/scripts host-initram/init nemo_pkg/nemo/lib/nemo/libexec gentoo-files/installcd-initrd/etc/scripts gentoo-files/installcd-initrd/etc/scripts/gui"

[ ! "$1" ] && { echo "1: common, nemoind, slkver, gentoo, ver, XXX"; exit 1;}


if [ "$1" = "XXX" ]; then
	for o in $obj_list ; do
		grep -B5 -A5 -R "${1}" $wd/files/$o | grep -ve "svn|~"
	done
else
	for o in $obj_list ; do
		grep -B5 -A5 -R "\-${1}\-" $wd/files/$o | grep -e '*.\(\)'|grep -ve "svn|~"
	done
fi

